import request from '@/axios/request';
import url from '@/axios/url';
const { mesUrl, adminUrl } = url();
// 导出url
export const exportUrlRatio = `${mesUrl}mesProdOrderPlan/exportUrlRatio`;
export const planOrderReportExport = `${mesUrl}mesProdOrderPlan/planOrderReportExport`;
export const getProcessExceptionAnalysisExport = `${mesUrl}mesProdOrderPlan/getProcessExceptionAnalysisExport`;

//工序异常分析 分页查询
export function getProcessExceptionAnalysis (params = {}) {
  return request({
    url: `${mesUrl}mesProdOrderPlan/getProcessExceptionAnalysis`,
    method: 'get',
    params,
  });
}
//工序异常分析 折线图
export function getProcessExceptionAnalysisLine (params = {}) {
  return request({
    url: `${mesUrl}mesProdOrderPlan/getProcessExceptionAnalysisLine`,
    method: 'get',
    params,
  });
}
//工序异常分析 饼图
export function getProcessExceptionAnalysisCollect (params = {}) {
  return request({
    url: `${mesUrl}mesProdOrderPlan/getProcessExceptionAnalysisCollect`,
    method: 'get',
    params,
  });
}

//分页查询
export function getList (params = {}) {
  return request({
    url: `${mesUrl}mesProdOrderPlan/orderPassRatio`,
    method: 'get',
    params,
  });
}

// 查询线体编码列表
export function getLineCodeListNew (params) {
  return request({
    url: `${adminUrl}baseFactoryModeling/children`,
    method: "get",
    params,
  });
}


//分页查询
export function getPlanOrderReport (params = {}) {
  return request({
    url: `${mesUrl}mesProdOrderPlan/getPlanOrderReport`,
    method: 'get',
    params,
  });
}


//分页查询
export function getPlanOrderReportLine (params = {}) {
  return request({
    url: `${mesUrl}mesProdOrderPlan/getPlanOrderReportLine`,
    method: 'get',
    params,
  });
}

// 查询订单状态列表
export function getOrderStatusList () {
  return request({
    url: `${adminUrl}dict/type/plan_status`,
    method: "get",
  });
}
// 查询订单状态列表
export function getYesOrNot () {
  return request({
    url: `${adminUrl}dict/type/yes_or_not`,
    method: "get",
  });
}
// 查询生产订单类型：内销，外销，样机列表
export function getProdOrderTypeList () {
  return request({
    url: `${adminUrl}dict/type/prod_order_type`,
    method: "get",
  });
}